package com.catmiao.ai.controller;

import com.catmiao.ai.service.ChatPersistenceAssistant;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class ChatController {

    @Resource
    private ChatPersistenceAssistant chatPersistenceAssistant;


    @GetMapping("/chat/redis")
    public String testChat(Long userId,String message){


        String msg = chatPersistenceAssistant.chat(userId, message);


        return msg;
    }
}
